﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace QLVT1
{
    class HangHoaDAL
    {
        public HangHoaDAL()
        {
        }
        public DataTable DocDanhSachHangHoa()
        {
            SqlConnection conn = new SqlConnection();
            conn.ConnectionString = @"Data Source=HUNGLE-PC\SQLEXPRESS;Initial Catalog=qlvt; User Id=sa; Password=sa";
            conn.Open();
            SqlCommand cmd = new SqlCommand("select * from hanghoa", conn);
            SqlDataReader dr = cmd.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(dr);
            return dt;
        }
    }
}